package com.wonders.module.auth.entity.bo;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

import com.wonders.framework.entity.bo.BaseBo;

/**
 * 菜单信息BO
 * 
 * @author WuBin
 * 
 */
@Entity
@Table(name = "AU_MENU")
public class Menu extends BaseBo {

	/**
	 * 编号
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "dateSequenceGenerator")
	@GenericGenerator(name = "dateSequenceGenerator", strategy = "com.wonders.framework.dao.sequence.DateSequenceGenerator", parameters = { @Parameter(name = "sequence", value = "SEQ_MENU") })
	private Long id;

	/**
	 * 名称
	 */
	private String name;

	/**
	 * 父级菜单编号
	 */
	private Long parentId;

	/**
	 * 链接
	 */
	private String url;

	/**
	 * 排序
	 */
	private Integer sort;

	/**
	 * 是否有效
	 */
	private Integer enable;

	public Long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public Long getParentId() {
		return parentId;
	}

	public String getUrl() {
		return url;
	}

	public Integer getSort() {
		return sort;
	}

	public Integer getEnable() {
		return enable;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public void setEnable(Integer enable) {
		this.enable = enable;
	}

	@Override
	public String toString() {
		return "Menu [enable=" + enable + ", id=" + id + ", name=" + name
				+ ", parentId=" + parentId + ", sort=" + sort + ", url=" + url
				+ "]";
	}

}
